import { requestClient } from '#/api/request';

// 查询下拉框大赛列表
export async function queryMatchListApi() {
  return requestClient.get('/match/query-match-list');
}
// 创建大赛管理
export async function createMatchManageApi(data: any) {
  return requestClient.post('/match/create-match-manage', data);
}
// 创建大赛协议
export async function createMatchAgreementApi(data: any) {
  return requestClient.post('/match/create-match-agreement', data);
}
// 根据条件查询大赛信息
export async function getMatchInfoByConditionApi(params: any) {
  return requestClient.get('/match/get-match-info-by-condition', { params });
}
// 查询大赛协议（按matchId 查询）
export async function getMatchAgreementApi(params: any) {
  return requestClient.get('/match/query-match-agreement-by-condition', { params });
}

// 创建大赛首页配置
export async function createMatchFirstPageApi(data: any): Promise<any> {
  return requestClient.post('/match/create-match-first-page', data);
}

// 获取大赛首页配置
export async function getMatchFirstPageApi(params: any): Promise<any> {
  return requestClient.get('/match/query-match-first-page-by-condition', { params });
}

// 展示大赛首页配置
export async function showMatchFirstPageApi(params: any): Promise<any> {
  return requestClient.get('/match/show-match-first-page', { params });
}

// 查询大赛首页根据ID
export async function getMatchFirstPageByIdApi(data: any): Promise<any> {
  return requestClient.get(`/match/query-match-first-page-by-id/${data.id}`);
}

// 删除大赛首页根据ID
export async function deleteMatchFirstPageByIdApi(id: any): Promise<any> {
  return requestClient.delete(`/match/delete-match-first-page-by-id/${id}`);
}
